Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azurerm_batch_pool - Support for Container Registry configuration #4072

Merged
merged 5 commits into from
Aug 21, 2019
Merged

azurerm_batch_pool - Support for Container Registry configuration #4072

merged 5 commits into from
Aug 21, 2019

Conversation

ennui93
Copy link
Contributor

@ennui93 ennui93 commented Aug 13, 2019

Add a container_registries block to the batch pool container configuration resource.

This setting is necessary for Azure Batch service Pools to support custom container images (i.e. from private container repositories).

- Use hashed ID for attributes validation in tests
- Expect non-empty plan for tests dealing with container registry changes
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ennui93,

Thank you for the PR. My main concern is that we use actual schema instead of a TypeMap for all the properties of the container registry.:

"container_registries": {
				Type:     schema.TypeSet,
				Optional: true,
				computed: true,
				Elem: &schema.Resource{
					Schema: map[string]*schema.Schema{
						"registry_server": {
							...
						},

						"user_name": {
							...
						},

						"password": {
							...
						},
					},
				},
			},

azurerm/data_source_batch_pool.go Outdated Show resolved Hide resolved
- Use list of Resources rather than generic set for container registries
@ennui93
Copy link
Contributor Author

ennui93 commented Aug 15, 2019

Hi @katbyte, thank you for your review. I have revamped the PR with the schema as requested. Please review and provide any pertinent feedback at your convenience.

@ghost ghost removed the waiting-response label Aug 15, 2019
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the revisions @ennui93,

In addition to my comments inline could we update the datasource documentation?

My main concern is that we are reading the probably blank password back into state & expecting a non empty plan. What we should do is pass along the password thats already in the state.

website/docs/r/batch_pool.html.markdown Outdated Show resolved Hide resolved
website/docs/r/batch_pool.html.markdown Outdated Show resolved Hide resolved
website/docs/r/batch_pool.html.markdown Outdated Show resolved Hide resolved
website/docs/r/batch_pool.html.markdown Show resolved Hide resolved
azurerm/resource_arm_batch_pool.go Show resolved Hide resolved
azurerm/resource_arm_batch_pool.go Show resolved Hide resolved
azurerm/resource_arm_batch_pool.go Show resolved Hide resolved
azurerm/resource_arm_batch_pool_test.go Outdated Show resolved Hide resolved
website/docs/r/batch_pool.html.markdown Outdated Show resolved Hide resolved
azurerm/helpers/azure/batch_pool.go Outdated Show resolved Hide resolved
@katbyte katbyte added this to the v1.34.0 milestone Aug 15, 2019
- Find and save to state container registry password as supplied by user
- Documentation: Make explicit where new resources must be created
- Documentation: Format alignment
- Validate container registry parameters are not empty
- Update integration tests per new password behavior as in first point
@ennui93
Copy link
Contributor Author

ennui93 commented Aug 19, 2019

Hi @katbyte, thanks again for your second review. I believe I have addressed all of your comments.

You are correct that I was unaware how to pass the password supplied by the user into the state. The solution looks much better now.

Please review at your convenience.

@ghost ghost removed the waiting-response label Aug 19, 2019
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the revisions @ennui93! LGTM now

@katbyte katbyte modified the milestones: v1.34.0, v1.33.0 Aug 21, 2019
@katbyte katbyte merged commit a9a9872 into hashicorp:master Aug 21, 2019
@katbyte katbyte changed the title Add Batch Pool Container Registry configuration azurerm_batch_pool - Support for Container Registry configuration Aug 21, 2019
katbyte added a commit that referenced this pull request Aug 21, 2019
@ghost
Copy link

ghost commented Aug 22, 2019

This has been released in version 1.33.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 1.33.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Sep 20, 2019

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Sep 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants